import React from 'react';
import { Form, Input, Button, Checkbox } from 'antd';
import { connect } from 'umi';

class BasicConfig extends React.Component<any, any> {
  constructor(props: any) {
    super(props);
  }
  render() {
    return (
      <Form
        labelCol={{ span: 6 }}
        wrapperCol={{ span: 18 }}
        name="basic"
        fields={this.props.fields}
        onFieldsChange={(_, allFields) => {
          this.props.onChange(allFields);
        }}
      >
        <Form.Item label="X坐标" name="x">
          <Input />
        </Form.Item>

        <Form.Item label="Y坐标" name="y">
          <Input />
        </Form.Item>
        <Form.Item label="宽度" name="w">
          <Input />
        </Form.Item>

        <Form.Item label="高度" name="h">
          <Input />
        </Form.Item>
      </Form>
    );
  }
}

export default connect(({ component }: any) => ({
  component,
}))(BasicConfig);
